package com.x.client.bean

import android.os.Parcelable
import com.google.gson.annotations.SerializedName
import kotlinx.android.parcel.Parcelize


/**
 * Creator : GG
 * Date    : 2018/4/24
 * Mail    : gg.jin.yu@gmai.com
 * Explain :
 */
@Parcelize
data class CarBaseParam(
        @SerializedName("baseCarEnvironOptions") var baseCarEnvironOptions: List<String>? = listOf(),
        @SerializedName("baseCarInColorOptions") var baseCarInColorOptions: List<BaseCarColorOption>? = listOf(),
        @SerializedName("baseCarFuelOptions") var baseCarFuelOptions: List<String>? = listOf(),
        @SerializedName("baseCarGearboxOptions") var baseCarGearboxOptions: List<String>? = listOf(),
        @SerializedName("baseCarPurposeOptions") var baseCarPurposeOptions: List<BaseCarPurposeOption>? = listOf(),
        @SerializedName("baseCarTypeOptions") var baseCarTypeOptions: List<BaseCarTypeOptions>? = listOf(),
        @SerializedName("baseCarOutColorOptions") var baseCarOutColorOptions: List<BaseCarColorOption>? = listOf()
) : Parcelable

@Parcelize
data class BaseCarPurposeOption(
        @SerializedName("purposeKey") var purposeKey: String? = "",
        @SerializedName("purposeValue") var purposeValue: String? = ""
) : Parcelable {
    override fun toString(): String {
        return purposeValue ?: ""
    }
}

@Parcelize
data class BaseCarColorOption(
        @SerializedName("colorCode") var colorCode: String? = "",
        @SerializedName("colorId") var colorId: Int? = 0,
        @SerializedName("colorIn") var colorIn: Int? = 0,
        @SerializedName("colorName") var colorName: String? = "",
        @SerializedName("colorOut") var colorOut: Int? = 0,
        var state: Boolean = false
) : Parcelable

@Parcelize
data class BaseCarTypeOptions(
        @SerializedName("carTypeId") var carTypeId: Int? = 0, //20
        @SerializedName("carTypeName") var carTypeName: String? = "" //其他
) : Parcelable {
    override fun toString(): String {
        return carTypeName?:""
    }
}
